package com.acoffee.web;

import com.acoffee.pojo.Category;
import com.acoffee.service.Impl.CategoryServiceImpl;
import com.fasterxml.jackson.databind.ObjectMapper;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;

/**
 * @author acoffee
 * @create 2021-10-29 16:13
 */
@WebServlet("/category/*")
public class CategoryServlet extends BaseServlet {

    CategoryServiceImpl categoryService = new CategoryServiceImpl();

    public void queryAllCategory(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {

        List<Category> list = categoryService.QueryAllCategory();
        response(resp,list);
    }


}
